package com.wwinsoft.framework.service.workflow;

import java.util.List;
import java.util.Map;

import org.activiti.engine.task.Task;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.wwinsoft.framework.dao.workflow.TaskQueryDao;
import com.wwinsoft.framework.entity.security.User;
import com.wwinsoft.modules.orm.Page;

/**
 * @author: Tim Chen
 * @since 1.0
 */
@Service
@Transactional
@SuppressWarnings(value = { "unchecked" })
public class TaskQueryService {

    @Autowired
    private TaskQueryDao taskQueryDao;

    public Page<? extends Task> searchTaskPage(Page<? extends Task> page , Map filter) {
        return taskQueryDao.searchTaskPage(page, filter);
    }

    public List<? extends Task> searchTaskList(Map filter){
        return taskQueryDao.searchTaskList(filter);
    }

    public List<User> selectTaskCandidateUsers(Map filter){
        return taskQueryDao.selectTaskCandidateUsers(filter);
    }
}
